<include file="Public/min-header"/>

<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">           
                <div class="panel-body ">   
                   	<ul class="nav nav-tabs">
                        <foreach name="group_list" item="vo" key="k">
                     		<li <if condition="$k eq 'shopping'">class="active"</if>><a href="javascript:void(0)" data-url="{:U('System/index',array('inc_type'=>$k))}" data-toggle="tab" onclick="goset(this)">{$vo}</a></li>
                     	</foreach>                      
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('System/handle')}">                    
                        <!--通用信息-->
                    <div class="tab-content col-md-10">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody>                                    
                                <!-- <tr>
                                    <td class="col-sm-2">全场满多少免运费：<br/>(0表示不免运费)</td>
                                    <td class="col-sm-8">
                                        <input type="number"  pattern="^\d{1,}$" title="只能输入数字"  class="form-control" name="freight_free" value="{$config.freight_free|default='0'}" >
                                        <span id="err_attr_name" style="color:#F00; display:none;"></span>                                        
                                    </td>
                                </tr> -->

                                <!-- <tr>
                                    <td class="col-sm-2">默认快递：<br/></td>
                                    <td class="col-sm-8">
                                        <select id="shipping_code" name="default_shipping"  class="form-control" style="width: 170px;">
                                            <volist name="shipping_list" id="shipping">
                                                <option value="{$shipping.code}"  <if condition="$config['default_shipping'] eq $shipping['code']"> selected="selected"</if>>{$shipping.name}</option>
                                            </volist>
                                        </select>
                                    </td>
                                </tr> -->

                                <tr>
                                    <td>{:C('POINT_NAME')}换算比例：</td>
                                    <td >                         		
                                        <input type="radio" class="" name="point_rate" value="1"  <if condition="$config[point_rate] eq 1"> checked </if> >1元 = 1{:C('POINT_NAME')}  &nbsp;&nbsp;&nbsp;&nbsp;
                                        <input type="radio" class="" name="point_rate" value="10" <if condition="$config[point_rate] eq 10"> checked </if> >1元 = 10{:C('POINT_NAME')}  &nbsp;&nbsp;&nbsp;&nbsp;
                                        <input type="radio" class="" name="point_rate" value="100"<if condition="$config[point_rate] eq 100"> checked </if> >1元 = 100{:C('POINT_NAME')}
                                    </td>
                                </tr>    
                                <tr>
                                    <td>发货后多少天自动收货：</td>
                                    <td >                         		
                                        <select class="form-control" name="auto_confirm_date" id="distribut_date">
                                                <for start="1" end="31" name="i" >          
                                                    <option value="{$i}" <if condition="$config[auto_confirm_date] eq $i">selected="selected"</if>>{$i}天</option>
                                                </for>
                                        </select>                                      
                                    </td>
                                </tr>

                                <tr>
                                    <td>多少天自动退款：</td>
                                    <td >
                                        <select class="form-control" name="auto_drawback_date" id="auto_drawback_date">
                                            <for start="1" end="30" name="i" >
                                                <option value="{$i}" <if condition="$config[auto_drawback_date] eq $i">selected="selected"</if>>{$i}天</option>
                                            </for>
                                        </select>
                                    </td>
                                </tr>

                                <tr>
                                    <td>聚合快递key：</td>
                                    <td >
                                        <input type="text" class="input-sm" name="juhe_exp_key" value="{$config['juhe_exp_key']}" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>同城配送范围（千米）</td>
                                    <td>
                                        <input type="text" class="input-sm" name="dd_distance" value="{$config['dd_distance']}"/>千米
                                    </td>
                                </tr>
                                <tr>
                                    <td>同城配送运费（元）</td>
                                    <td>
                                        <input type="text" class="input-sm" name="dd_exp_fee" value="{$config['dd_exp_fee']}"/>元
                                    </td>
                                </tr>
                                <tr>
                                    <td>同城运费平台分担（%）</td>
                                    <td>
                                        <input type="text" class="input-sm" name="dd_exp_fee_rate" value="{$config['dd_exp_fee_rate']}"/>%
                                    </td>
                                </tr>
                                <tr>
                                    <td>达达app_key：</td>
                                    <td >
                                        <input type="text" class="input-sm" name="dd_app_key" value="{$config['dd_app_key']}" />
                                    </td>
                                </tr>

                                <tr>
                                    <td>达达app_secret:</td>
                                    <td>
                                        <input type="text" class="input-sm" name="dd_app_secret" value="{$config['dd_app_secret']}"/>
                                    </td>
                                </tr>

                                <tr>
                                    <td>达达商户ID:</td>
                                    <td>
                                        <input type="text" class="input-sm" name="dd_source_id" value="{$config['dd_source_id']}"/>
                                    </td>
                                </tr>

                                <tr>
                                    <td>达达是否开启测试模式：</td>
                                    <td >
                                        是<input type="radio" class="" name="dd_is_test" value="1" <if condition="$config[dd_is_test] eq 0"> checked="checked"</if>>
                                        否<input type="radio" class="" name="dd_is_test" value="0" <if condition="$config[dd_is_test] eq 1"> checked="checked"</if>>
                                    </td>
                                    <td></td>
                                </tr>
                                <!-- <tr>
                                    <td>减库存的时机：</td>
                                    <td >                         		
                                        <input type="hidden" class="" name="reduce" value="1" >订单支付时  &nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                </tr>   -->

                                <tr>
                                    <td>普通商品允许退货时间（小时）:</td>
                                    <td>
                                        <input type="text" class="input-sm" name="drawback_time_normal" value="{$config['drawback_time_normal']}"/>小时
                                    </td>
                                </tr>

                                <tr>
                                    <td>特殊商品允许退货时间（小时）:</td>
                                    <td>
                                        <input type="text" class="input-sm" name="drawback_time_spec" value="{$config['drawback_time_spec']}"/>小时
                                    </td>
                                </tr>

                                <tr>
                                    <td>特殊订单退货运费:</td>
                                    <td>
                                        <input type="text" class="input-sm" name="drawback_exp_fee" value="{$config['drawback_exp_fee']}"/>元
                                    </td>
                                </tr>

                                <tr>
                                    <td>邮寄商品时间限制(天):</td>
                                    <td>
                                        <input type="text" class="input-sm" name="drawback_exp_end_time" value="{$config['drawback_exp_end_time']}"/>天
                                    </td>
                                </tr>

                                <tr>
                                    <td>每月平台免商家退货运费次数:</td>
                                    <td>
                                        <input type="text" class="input-sm" name="count_free_drawback_exp_fee" value="{$config['count_free_drawback_exp_fee']}"/>
                                    </td>
                                </tr>

                                </tbody>
                                <tfoot>
                                	<tr>
                                	<td><input type="hidden" name="inc_type" value="{$inc_type}"></td>
                                	<td class="text-right"><input class="btn btn-primary" type="buuton" onclick="adsubmit()" value="保存"></td></tr>
                                </tfoot>                               
                                </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function adsubmit(){
	$('#handlepost').submit();
}

$(document).ready(function(){
	get_province();
});

function goset(obj){
	window.location.href = $(obj).attr('data-url');
}
</script>

</body>
</html>